package com.egoo.ticket.server.pojo.enums;

import lombok.Getter;

/**
 * @author donny
 */
@Getter
public enum FieldEnum {
	/**
	 * 待催办
	 */

	WAIT_URGE("待催办", "1"),
	/**
	 * 已催办
	 */
	URGED("已催办", "2"),

	/**
	 * 超时
	 */
	IS_TIME_OUT("已超时", "Y"),
	/**
	 * 未超时
	 */
	NOT_TIME_OUT("未超时", "N"),

	/**
	 * 是否领取
	 */
	IS_RECIEVE("已领取", "Y"),
	/**
	 * 合并工单类型
	 */
	COMBINE_TYPE("父类合并工单标识", "parent"),
	/**
	 * 转出
	 */
	FLOW_OUT("转出", "flowOut"),
	/**
	 * 转入
	 */
	FLOW_INTO("转入", "flowIn"),
	/**
	 * 待关注
	 */
	IS_CANCLE("待关注", "N"),
	/**
	 * 已关注
	 */
	IS_MONITOR("已关注", "Y");
	private String message;
	private String code;

	FieldEnum(String message, String code) {
		this.message = message;
		this.code = code;
	}

	public static FieldEnum getMessage(String code) {
		for (FieldEnum fieldEnum : values()
		) {
			if (fieldEnum.getCode() == code) {
				return fieldEnum;
			}
		}
		return null;
	}


}
